float screenWidth;
float screenHeight;
float texWidthInv = 0;
float texHeightInv = 0;




struct VS_IN
{
	float3 pos   : POSITION;
	float2 tex   : TEXCOORD0;
	float4 color : TEXCOORD1;
	int4   chnl  : TEXCOORD2;
};

struct VS_OUTPUT
{
	float4 pos   : SV_POSITION;
	float2 tex   : TEXCOORD0; 
	float4 color : TEXCOORD1;
	int4   chnl  : TEXCOORD2;
};

VS_OUTPUT main(VS_IN In)
{
	VS_OUTPUT vs_out;

	// The vertices are already transformed
	// Just copy the texture coordinate and color 
	vs_out.pos.x = 2 * In.pos.x / screenWidth - 1;
	vs_out.pos.y = 1 - 2 * In.pos.y / screenHeight;
	vs_out.pos.z = 0;
	vs_out.pos.w = 1;

	vs_out.tex   = float2(In.tex.x * texWidthInv, In.tex.y * texHeightInv);;
	vs_out.color = In.color;
	vs_out.chnl  = In.chnl;

	return vs_out;
}